{{Extend "layout"}}
{{Block "title"}}{{"测试邮件"|T}}{{/Block}}
{{Block "breadcrumb"}}
{{Super}}
<li class="active">{{"测试邮件"|T}}</li>
{{/Block}}
{{Block "main"}}

<div class="row">
    <div class="col-md-12">
        <div class="block-flat">
          <div class="header">							
            <h3>{{"测试邮件"|T}}</h3>
          </div>
          <div class="content">
              <form class="form-horizontal group-border-dashed" method="POST" id="email-form" action="">
              <div class="form-group">
                <label class="col-sm-2 control-label">{{"Email地址"|T}}</label>
                <div class="col-sm-8">
                    <input type="email" class="form-control" name="email" placeholder="{{"输入接收测试邮件的Email地址"|T}}" required value="{{Form "email"}}">
                </div>
              </div>
              <div class="form-group">
									<div class="col-sm-9 col-sm-offset-2">
									  <button type="submit" class="btn btn-primary btn-lg"><i class="fa fa-save"></i> {{"保存"|T}}</button>
									  <button type="reset" class="btn btn-default btn-lg"><i class="fa fa-refresh"></i> {{"重置"|T}}</button>
									</div>
							</div>
            </form>
          </div><!-- /.content -->
        </div><!-- /.block-flat -->
    </div>
</div>
{{/Block}}
{{Block "footer"}}
<script type="text/javascript">
$(function(){
    $('#email-form').on('submit',function(e){
        e.preventDefault();
        $.post(window.location.href,$(this).serialize(),function(r){
            if(r.Code==1){
                App.message({title: '{{"测试结果"|T}}', text: '{{"测试邮件已发送，请查收。"|T}}', class_name: "success"});
                return;
            }
            App.message({title: '{{"测试结果"|T}}', text: r.Info, class_name: "danger"});
        },'json');
    });
});
</script>
{{/Block}}